Skip to content

Conversation

smereu
Copy link
Contributor

@smereu smereu commented Aug 5, 2025

Description

This pull request contains the following changes

  • Enable the boolean operation to track changes. When tracking changes it skips clean-up operation on the python side since all the logic resides in the SC APIs.
  • Clean-up code to have a single implementation for serializing the tracked changes.
  • Fixes to the tracker code that deals with added/deleted bodies to keep into account the fact we are caching the bodies so the update needs to be done on the actual data. Also remove use of guids rather than object ids, which prevent proper matching

Issue linked

Please mention the issue number or describe the problem this pull request addresses.

Checklist

  • I have tested my changes locally.
  • I have added necessary documentation or updated existing documentation.
  • I have followed the coding style guidelines of this project.
  • I have added appropriate unit tests.
  • I have reviewed my changes before submitting this pull request.
  • I have linked the issue or issues that are solved to the PR if any.
  • I have assigned this PR to myself.
  • I have added the minimum version decorator to any new backend method implemented.
  • I have made sure that the title of my PR follows Conventional commits style (e.g. feat: extrude circle to cylinder)

@smereu smereu requested a review from a team as a code owner August 5, 2025 18:40
@smereu
Copy link
Contributor Author

smereu commented Aug 5, 2025

This PR needs an update of Core Service code before it can be merged

@github-actions github-actions bot added the enhancement New features or code improvements label Aug 5, 2025
Copy link

codecov bot commented Aug 5, 2025

Codecov Report

❌ Patch coverage is 51.42857% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.63%. Comparing base (1e505a7) to head (1e711f6).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/ansys/geometry/core/designer/design.py 20.00% 20 Missing ⚠️
src/ansys/geometry/core/tools/problem_areas.py 11.11% 8 Missing ⚠️
...c/ansys/geometry/core/_grpc/_services/v0/bodies.py 75.00% 3 Missing ⚠️
src/ansys/geometry/core/designer/body.py 72.72% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2153      +/-   ##
==========================================
- Coverage   94.81%   94.63%   -0.19%     
==========================================
  Files         141      141              
  Lines       10404    10431      +27     
==========================================
+ Hits         9865     9871       +6     
- Misses        539      560      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RobPasMue RobPasMue changed the title Feat/track boolean operations feat: tracking boolean operations Aug 11, 2025
@@ -494,7 +494,7 @@ def find_and_fix_extra_edges(self, **kwargs) -> dict: # noqa: D102
# Call the gRPC service
response = self.stub.FindAndFixExtraEdges(request)

serialized_tracker_response = self._serialize_tracker_command_response(
serialized_tracker_response = kwargs["parent_design"]._serialize_tracker_command_response(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we should align the method used - there is one serialization method as part of this module too. If either one or the other is redundant, we should remove it.

@@ -1045,6 +1045,55 @@ def __repr__(self) -> str:
lines.append(f" N Design Points : {len(self.design_points)}")
return "\n".join(lines)

def _serialize_tracker_command_response(self, response) -> dict:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't go here IMO

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should live inside the "_grpc" layer since it is purely related to the serialization of gRPC responses

@RobPasMue
Copy link
Member

@jacobrkerstetter @smereu -- tracker tests are still failing (although it might be related to my last comment #2153 (comment))

Make sure they pass again as part of this PR since we are dealing with the tracker directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or code improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants